A distance measuring apparatus which measures a distance to an object by using triangulation usually comprises a pair of optical systems and imaging elements. For example, the pair of optical systems are disposed along the horizontal (right-left) direction or the vertical (up-down) direction, and images from light of the object respectively converged by the pair of optical systems are converted into electrical signal-based pictures by the imaging elements. This is called imaging. Moreover, in the present specification, a picture is meant to be an image containing an object as electrically converted by an imaging element. A distance measuring apparatus determines a parallax amount between two pictures that have been imaged, and measures a distance to the object by using the principle of triangulation from the parallax amount. Such distance measuring apparatuses are used for measurement of vehicular gaps between automobiles, camera auto-focus systems, three-dimensional shape measurement systems, and the like.
FIG. 21 is a diagram describing triangulation with a distance measuring apparatus. As shown in FIG. 21, regarding point P on an object O as the point to be measured, images from light of the object O are respectively formed, by an imaging lens G1 of an first imaging optical system and an imaging lens G2 of a second imaging optical system, onto an imaging plane N1 of a first imaging element and an imaging plane N2 of a second imaging element.
When point P is located on an optical axis a1 of the first imaging optical system, an image of point P is formed at a point where the imaging plane N1 intersects the optical axis a1 of the first imaging optical system. The second imaging optical system is disposed so that the optical axis a1 of the first imaging optical system and an optical axis a2 of the second imaging optical system are parallel to each other, with a predetermined interval B therebetween. A line segment connecting a point where the imaging plane N2 intersects the optical axis a2 of the second imaging optical system and the point where the imaging plane N1 intersects the optical axis a1 of the first imaging optical system is a line segment that serves as a basis of triangulation, called the base line, which does not change depending on the position of the object. The length of this base line, i.e., the base line length, is equal to the interval B. Hereinafter, the base line length is assumed to be B.
On the imaging plane N2, an image of point P is formed at a position which is distance Δ away from the optical axis a2 of the second imaging optical system along the base line. This is called a parallax, and its length is called a parallax amount Δ.
Assuming that the imaging lenses G1 and G2 of the first and second imaging optical systems have a focal length f, the following approximate expression holds true.
                    Δ        ≈                  B          ·                      f            Z                                              [                  eq          .                                          ⁢          1                ]            
The parallax amount Δ can be determined through a pattern matching of a picture obtained from the image formed on the imaging plane N1 and a picture obtained from the image formed on the imaging plane N2. Therefore, by solving (eq. 1) with respect to Z by substituting the parallax amount Δ, the base line length B, and the focal length f into (eq. 1), the distance Z can be determined. Although the parallax amount Δ will be in the unit of pixels, calculation to the unit of 0.1 pixels (subpixel unit) becomes possible through interpolation processing.
Generally speaking, in an environment where a distance measuring apparatus is used, the distance measuring apparatus itself is required to be small in size, which makes it difficult to obtain a sufficiently long base line length B. As can be seen from (eq. 1), when the base line length B is short, the parallax amount Δ is also small. Thus, there is a need to obtain a high accuracy of distance measurement even in a distance measuring apparatus with a short base line length B.
However, if the parallax amount Δ is small, the accuracy of distance measurement is likely to be deteriorated due to various factors. For example, when the ambient temperature changes, the members composing the distance measuring apparatus will expand or contract correspondingly, thus causing a change in the position of the optical axes of optical systems. If the distance measuring apparatus has a complex structure, the positions of the optical axes of the optical systems will also change in a complicated manner. It is difficult to estimate the resultant amount of change in the parallax amount Δ, and it is also difficult to correct the amount of change. In this case, the distance measuring apparatus cannot be used other than in a temperature range where decrease in the accuracy of distance measurement is tolerated.
Moreover, it is also possible for the positions of the optical axes to change in the case where the positions of the members or their state of assembly changes due to vibration, or where the dimensions of the members or their state of assembly changes through aging. A change in the parallax amount resulting from these will also greatly affect the accuracy of distance measurement, all the more so when the parallax amount Δ is smaller.
In order to solve such problems, Patent Document 1 proposes a method of preventing a decrease in the accuracy of distance measurement caused by changes in ambient temperature, which involves providing a temperature sensor in the distance measuring apparatus and unequivocally correcting changes in the interval between the optical axes by using a detected temperature and coefficients of linear expansion of the members.
Moreover, Patent Document 2 proposes a method of correcting the parallax amount Δ by detecting an amount of deviation of a reference object whose distance is known, in order to prevent deterioration in the accuracy of distance measurement due to vibration and aging.
[Patent Document 1] Japanese Patent No. 3090078
[Patent Document 2] Japanese Laid-Open Patent Publication No. 7-71956